public class Producer implements Runnable{
    private Reso rs = new Reso();

    public Producer(Reso rs) {
        this.rs = rs;
    }

    @Override
    public void run() {
        for(int i = 1; i <= 10; i++) {
            try {
                rs.produce(i);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
